package org.mat.ipaas.ucenter.service.api.system;

import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api;
import org.mat.framework.lang.dto.MatApiResponse;
import org.mat.ipaas.ucenter.service.dto.system.entity.SysGatewayRouteDTO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * gateway路由管理
 */
@Api(tags = "gateway路由管理")
@FeignClient(name = "mat-ipaas-ucenter-service",contextId = "sys-gateway-route-rest-api")
public interface SysGatewayRouteRestAPI {

    @PostMapping(value = "/sys/gatewayRoute/updateAll")
    MatApiResponse<?> updateAll(@RequestBody JSONObject json);

	@GetMapping(value = "/sys/gatewayRoute/list")
    MatApiResponse<?> queryPageList(SysGatewayRouteDTO sysGatewayRouteDTO);

	@GetMapping(value = "/sys/gatewayRoute/clearRedis")
    MatApiResponse<?> clearRedis();

	/**
     * 通过id删除
     *
     * @param id
     * @return
     */
    //@RequiresPermissions("system:getway:delete")
    @RequestMapping(value = "/sys/gatewayRoute/delete", method = RequestMethod.DELETE)
    MatApiResponse<?> delete(@RequestParam(name = "id", required = true) String id);

}
